import 'package:yurun_smartmerchants/models/getperson_information_entity.dart';

getpersonInformationEntityFromJson(GetpersonInformationEntity data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['remark'] != null) {
		data.remark = json['remark'];
	}
	if (json['type'] != null) {
		data.type = json['type']?.toInt();
	}
	if (json['filedDate'] != null) {
		data.filedDate = json['filedDate']?.toString();
	}
	if (json['marketId'] != null) {
		data.marketId = json['marketId']?.toInt();
	}
	if (json['number'] != null) {
		data.number = json['number']?.toString();
	}
	if (json['filedMarketName'] != null) {
		data.filedMarketName = json['filedMarketName']?.toString();
	}
	if (json['businessTypeName'] != null) {
		data.businessTypeName = json['businessTypeName']?.toString();
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['address'] != null) {
		data.address = json['address'];
	}
	if (json['subjectNo'] != null) {
		data.subjectNo = json['subjectNo']?.toString();
	}
	if (json['inMarketName'] != null) {
		data.inMarketName = json['inMarketName'];
	}
	if (json['certificationId'] != null) {
		data.certificationId = json['certificationId']?.toInt();
	}
	if (json['operationName'] != null) {
		data.operationName = json['operationName'];
	}
	if (json['stall'] != null) {
		data.stall = json['stall'];
	}
	if (json['businessTypeId'] != null) {
		data.businessTypeId = json['businessTypeId']?.toInt();
	}
	if (json['certification'] != null) {
		data.certification = new GetpersonInformationCertification().fromJson(json['certification']);
	}
	if (json['enterPriseName'] != null) {
		data.enterPriseName = json['enterPriseName'];
	}
	if (json['filedMarketNo'] != null) {
		data.filedMarketNo = json['filedMarketNo']?.toString();
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['phone'] != null) {
		data.phone = json['phone']?.toString();
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['auditStatus'] != null) {
		data.auditStatus = json['auditStatus']?.toInt();
	}
	if (json['inMarketNo'] != null) {
		data.inMarketNo = json['inMarketNo'];
	}
	if (json['businessType'] != null) {
		data.businessType = new GetpersonInformationBusinessType().fromJson(json['businessType']);
	}
	if (json['account'] != null) {
		data.account = new GetpersonInformationAccount().fromJson(json['account']);
	}
	return data;
}

Map<String, dynamic> getpersonInformationEntityToJson(GetpersonInformationEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['remark'] = entity.remark;
	data['type'] = entity.type;
	data['filedDate'] = entity.filedDate;
	data['marketId'] = entity.marketId;
	data['number'] = entity.number;
	data['filedMarketName'] = entity.filedMarketName;
	data['businessTypeName'] = entity.businessTypeName;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['address'] = entity.address;
	data['subjectNo'] = entity.subjectNo;
	data['inMarketName'] = entity.inMarketName;
	data['certificationId'] = entity.certificationId;
	data['operationName'] = entity.operationName;
	data['stall'] = entity.stall;
	data['businessTypeId'] = entity.businessTypeId;
	if (entity.certification != null) {
		data['certification'] = entity.certification.toJson();
	}
	data['enterPriseName'] = entity.enterPriseName;
	data['filedMarketNo'] = entity.filedMarketNo;
	data['deleted'] = entity.deleted;
	data['phone'] = entity.phone;
	data['name'] = entity.name;
	data['auditStatus'] = entity.auditStatus;
	data['inMarketNo'] = entity.inMarketNo;
	if (entity.businessType != null) {
		data['businessType'] = entity.businessType.toJson();
	}
	if (entity.account != null) {
		data['account'] = entity.account.toJson();
	}
	return data;
}

getpersonInformationCertificationFromJson(GetpersonInformationCertification data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['licenseNo'] != null) {
		data.licenseNo = json['licenseNo'];
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['credentials'] != null) {
		data.credentials = new List<GetpersonInformationCertificationCredential>();
		(json['credentials'] as List).forEach((v) {
			data.credentials.add(new GetpersonInformationCertificationCredential().fromJson(v));
		});
	}
	if (json['idCardNo'] != null) {
		data.idCardNo = json['idCardNo']?.toString();
	}
	if (json['legalPerson'] != null) {
		data.legalPerson = json['legalPerson'];
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['type'] != null) {
		data.type = json['type']?.toInt();
	}
	if (json['marketId'] != null) {
		data.marketId = json['marketId']?.toInt();
	}
	return data;
}

Map<String, dynamic> getpersonInformationCertificationToJson(GetpersonInformationCertification entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['licenseNo'] = entity.licenseNo;
	data['deleted'] = entity.deleted;
	if (entity.credentials != null) {
		data['credentials'] =  entity.credentials.map((v) => v.toJson()).toList();
	}
	data['idCardNo'] = entity.idCardNo;
	data['legalPerson'] = entity.legalPerson;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['type'] = entity.type;
	data['marketId'] = entity.marketId;
	return data;
}

getpersonInformationCertificationCredentialFromJson(GetpersonInformationCertificationCredential data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['licenseNo'] != null) {
		data.licenseNo = json['licenseNo']?.toString();
	}
	if (json['certificationId'] != null) {
		data.certificationId = json['certificationId']?.toInt();
	}
	if (json['validityEnd'] != null) {
		data.validityEnd = json['validityEnd'];
	}
	if (json['filePathi'] != null) {
		data.filePathi = json['filePathi']?.toString();
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['filePathiii'] != null) {
		data.filePathiii = json['filePathiii'];
	}
	if (json['licenseName'] != null) {
		data.licenseName = json['licenseName']?.toString();
	}
	if (json['validityStart'] != null) {
		data.validityStart = json['validityStart'];
	}
	if (json['marketId'] != null) {
		data.marketId = json['marketId']?.toInt();
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['fileIdii'] != null) {
		data.fileIdii = json['fileIdii']?.toInt();
	}
	if (json['filePathii'] != null) {
		data.filePathii = json['filePathii']?.toString();
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['fileIdi'] != null) {
		data.fileIdi = json['fileIdi']?.toInt();
	}
	if (json['fileIdiii'] != null) {
		data.fileIdiii = json['fileIdiii'];
	}
	return data;
}

Map<String, dynamic> getpersonInformationCertificationCredentialToJson(GetpersonInformationCertificationCredential entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['licenseNo'] = entity.licenseNo;
	data['certificationId'] = entity.certificationId;
	data['validityEnd'] = entity.validityEnd;
	data['filePathi'] = entity.filePathi;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['filePathiii'] = entity.filePathiii;
	data['licenseName'] = entity.licenseName;
	data['validityStart'] = entity.validityStart;
	data['marketId'] = entity.marketId;
	data['deleted'] = entity.deleted;
	data['fileIdii'] = entity.fileIdii;
	data['filePathii'] = entity.filePathii;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['fileIdi'] = entity.fileIdi;
	data['fileIdiii'] = entity.fileIdiii;
	return data;
}

getpersonInformationBusinessTypeFromJson(GetpersonInformationBusinessType data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['modular'] != null) {
		data.modular = json['modular']?.toInt();
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId']?.toInt();
	}
	if (json['modifierId'] != null) {
		data.modifierId = json['modifierId'];
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['marketId'] != null) {
		data.marketId = json['marketId']?.toInt();
	}
	return data;
}

Map<String, dynamic> getpersonInformationBusinessTypeToJson(GetpersonInformationBusinessType entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['modular'] = entity.modular;
	data['deleted'] = entity.deleted;
	data['creatorId'] = entity.creatorId;
	data['modifierId'] = entity.modifierId;
	data['name'] = entity.name;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['marketId'] = entity.marketId;
	return data;
}

getpersonInformationAccountFromJson(GetpersonInformationAccount data, Map<String, dynamic> json) {
	if (json['modifiedTime'] != null) {
		data.modifiedTime = json['modifiedTime']?.toString();
	}
	if (json['salt'] != null) {
		data.salt = json['salt'];
	}
	if (json['openId'] != null) {
		data.openId = json['openId'];
	}
	if (json['consumerId'] != null) {
		data.consumerId = json['consumerId']?.toInt();
	}
	if (json['creatorId'] != null) {
		data.creatorId = json['creatorId'];
	}
	if (json['difierId'] != null) {
		data.difierId = json['difierId'];
	}
	if (json['url'] != null) {
		data.url = json['url']?.toString();
	}
	if (json['password'] != null) {
		data.password = json['password'];
	}
	if (json['deleted'] != null) {
		data.deleted = json['deleted'];
	}
	if (json['owned'] != null) {
		data.owned = json['owned'];
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['username'] != null) {
		data.username = json['username']?.toString();
	}
	return data;
}

Map<String, dynamic> getpersonInformationAccountToJson(GetpersonInformationAccount entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['modifiedTime'] = entity.modifiedTime;
	data['salt'] = entity.salt;
	data['openId'] = entity.openId;
	data['consumerId'] = entity.consumerId;
	data['creatorId'] = entity.creatorId;
	data['difierId'] = entity.difierId;
	data['url'] = entity.url;
	data['password'] = entity.password;
	data['deleted'] = entity.deleted;
	data['owned'] = entity.owned;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['username'] = entity.username;
	return data;
}